package com.xxl.job.executor.sample.frameless.test.strategy_mode_plus;

public class StringReduceTwoStrategy implements Strategy{
    @Override
    public Object operate(Object object) {
        try {
            String string = (String)object;
            if (string.length() < 2){
                return null;
            }else {
                return string.substring(0,string.length() - 2);
            }
        } catch (Exception e) {
            System.out.println("入参不为字符串错误！");
        }
        return null;
    }
}
